﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Toolkit.Web.ViewComponents.DataGrid
{
    public interface IDataGridModel<T> where T : class
    {
        IEnumerable<T> DataResults
        {
            get;
        }

        int? TotalNumberOfResults
        {
            get;
        }

        IDataGridInputModel InputModel
        {
            get;
        }

        string PersistenceKey
        {
            get;
        }
    }

    public class DataGridModel<T> : IDataGridModel<T> where T : class
    {
        public IEnumerable<T> DataResults
        {
            get;
            set;
        }

        public int? TotalNumberOfResults
        {
            get;
            set;
        }

        public IDataGridInputModel InputModel
        {
            get;
            set;
        }

        public string PersistenceKey
        {
            get;
            set;
        }
    }
}
